'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.resources("login",'/api/login', controller.login);
  router.resources("user",'/api/user', controller.user);
  // router.post('/api/register/checkUsername', controller.register.checkUsername);
  // router.resources("room",'/api/room', controller.room);
  // router.resources("roomDeatil",'/api/roomDeatil', controller.roomDeatil);
  router.resources("business",'/api/business', controller.business);
  router.resources("company",'/api/company', controller.company);
  router.resources("about",'/api/about', controller.about);
  router.resources("photo",'/api/photo', controller.photo);
  router.resources("image",'/api/image', controller.image);
  router.resources("audio",'/api/audio', controller.audio);
  router.resources("home",'/api/home', controller.home);
  router.resources("icon",'/api/icon', controller.icon);
  router.resources("video",'/api/video', controller.video);
  router.resources("contact",'/api/contact', controller.contact);
  router.post('/api/uploadpictures', controller.upload.uploadpictures);
  router.post('/api/uploadMedia', controller.upload.uploadMedia);
  router.post('/api/deleteMedia', controller.upload.deleteMedia);
  
};
